><

Using the JavaScript Library by Default



The JavaScript option in the Script Library view of the Preferences dialog box controls the usage of the external JavaScript library in Adobe GoLive, leaving the decision to you whether you want the program to include JavaScript code from DHTML objects in any page you create (default behavior) or to shift it to the external library.

Use the options in the Script Library Preferences dialog box or Page Inspector as follows:

  • Leave the Write code to Page default option activated to have Adobe GoLive include the entire JavaScript code in the page(s) where the scripted action is used.
  • If your pages contain dynamic components, select the Import GoLive Script Library radio button. This option instructs Adobe GoLive to shift common code from any page you create from now on to the CSScriptLib.js script library. At the same time, a file reference is created in the header of each new page you create to ensure that the common code from the library is available when the browser loads the page.

  • When you select the Import GoLive Script Library radio button in the Script Library Preferences dialog box, Adobe GoLive reacts in one of two ways, depending on whether or not you have a site document open:

  • If the site document is open, it will create a library file in a new folder named Generated Items at the root level of the site folder when you save the page.
  • If you don't have a site document open in the background when you save the page, Adobe GoLive writes the code to a default library file which can be found in the Modules: JScripts subfolder of the Adobe GoLive program folder.

  • Note: Selecting the Import GoLive Script Library radio button in the Script Library Preferences dialog box does not move code from pages you have already saved to the CSScriptLib.js script library. To move code from those pages to the library, you will have to open each page and select the Import GoLive Script Library radio button in the HTML tab of the Page Inspector.


    Using Actions > Shifting Code to an External Library > Using the JavaScript Library by Default